import './dkbf.scss'
import '../index.scss'
import CONSTANT from '@/common/constants.js'
import http from '@/common/http.js'
import Flexbox from 'vux/src/components/flexbox/flexbox.vue'
import FlexboxItem from 'vux/src/components/flexbox/flexbox-item.vue'
export default {
  name: 'donatearea',
  components: {
    Flexbox,
    FlexboxItem
  },
  data () {
    return {
      donateAreaList: [],
    }
  },
  mounted () {
    this.init()
  },
  methods: {
    init: function () {
      this.doQuery()
    },
    doQuery: function () {
      http.post(CONSTANT.DONATE_AREA_LISRT, {}, (res) => {
        console.log(res)
        if (res.code == 200) {
          this.donateAreaList = res.list
        }
      })
    },
    goDetails: function (e) {
      this.$router.push({path: '/donateareadetails', query: {areaid: e}})
    },
    comeBack () {
      window.history.go(-1)
    }
  }
}
